package jp.co.cos.ittrick.channel.controller.admin.article;

import jp.co.cos.ittrick.channel.service.ArticleService;

import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;

public class ArticleDeleteController extends Controller {

    private ArticleService articleService;

    public ArticleDeleteController() {
        articleService = new ArticleService();
    }

    @Override
    public Navigation run() throws Exception {

        // リクエストパラメータ
        String article = asString("article");

        // Insert
        articleService.delete(Integer.valueOf(article));

        return redirect("/admin/article/");
    }
}
